package com.sheep.pattern.singleton;

/**
 * 静态内部类实现单例模式
 * @author wangze
 * @date 2021-01-13 15:48.
 **/
public class InnerSingletonTest {
	//
	// 注意私有

	private  InnerSingletonTest(){

	}

	private static   class  InnerSingletonTestHolder{

		private  static  InnerSingletonTest INSTANCE=new InnerSingletonTest();

	}

	public  static  InnerSingletonTest getInstance(){
		return  InnerSingletonTestHolder.INSTANCE;
	}


}
